Some(path) => path,
None => exe.clone(),
};
- try!(options.shell.status("Running", to_display.display()));
- match compile.process(exe).args(args).exec() {
+ let cmd = compile.process(exe).args(args);
+ try!(options.shell.concise(|shell| {
+ shell.status("Running", to_display.display().to_string())
+ }));
+ try!(options.shell.verbose(|shell| {
+ shell.status("Running", cmd.to_string())
+ }));
+ match cmd.exec() {
Ok(()) => {}
Err(e) => return Ok(Some(e))
}
}
}
+ try!(options.shell.verbose(|shell| {
+ shell.status("Running", p.to_string())
+ }));
match p.exec() {
Ok(()) => {}
Err(e) => return Ok(Some(e)),
RUNNING)));
})
+test!(cargo_test_verbose {
+ let p = project("foo")
+ .file("Cargo.toml", basic_bin_manifest("foo").as_slice())
+ .file("src/foo.rs", r#"
+ fn main() {}
+ #[test] fn test_hello() {}
+ "#);
+
+ assert_that(p.cargo_process("cargo-test").arg("-v").arg("hello"),
+ execs().with_stdout(format!("\
+{running} `rustc src[..]foo.rs [..]`
+{compiling} foo v0.5.0 ({url})
+{running} `[..]target[..]test[..]foo-[..] hello`
+
+running 1 test
+test test_hello ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured\n\n",
+ compiling = COMPILING, url = p.url(), running = RUNNING)));
+})
+
test!(many_similar_names {
let p = project("foo")
.file("Cargo.toml", r#"